/**
 * 提醒js 依赖jquery、layer
 */
(function(mt) {
	mt.remind = {
		listenr : function() {
			setInterval(getremindmessage, 20000);

			function getremindmessage() {

				$.ajax({
					url : "/message/remindMessage/web/get",
					dataType : "json",
					success : function(result) {
						if (result) {
							var ids = "";
							for (var i = 0; i < result.length; i++) {
								var message = result[i];
								ids += "," + message.id;

								layer.open({
									type : 1,
									title : message.title,
									content : "<div style='width:200px;height:100px;'>" + message.content + "</div>",
									offset : 'rb',
									shade : 0
								});

							}

							if (ids.length > 0) {
								ids = ids.substring(1);

								$.ajax({
									url : "/message/remindMessage/setreaded",
									data : {
										"ids" : ids
									},
									dataType : "text",
									success : function(result) {
										
									}
								});

							}
						}
					}
				});
			}
		}
	}
}(meeting));